GOTO statements transfer execution of the script to the beginning of the statement following the label associated with the GOTO. For example:
i,j : INTEGER; IF (j MOD 2 = 0) THEN GOTO 100; 100: i:= i + 1; If the condition (j MOD 2) = 0 evaluates to TRUE, execution in the script is transferred immediately to the beginning of the statement i:= i + 1, and the expression i:= i * 5 is never executed.The general syntax for a GOTO statement is:GOTO statements have several cautions which must be observed whenever using them:
![]()
GOTO statements can only transfer execution within the same procedure, function, or main body of a script. They cannot be used to jump between procedures or between scripts.
![]()
The destination of a GOTO statement must always be the beginning of a statement.
![]()
Jumping to statements that are contained within the structure of other statements can have undefined effects; the VectorScript compiler will not recognize this action as an error.
| Nemetschek NA |
| Phone: 410.290.5114 |
| Fax: 410.290.8050 |